package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.NewsPage;
import cn.wolfcode.trip.base.domain.Strategy;
import cn.wolfcode.trip.base.query.NewPagesQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.TravelCommentQueryObject;

import java.util.List;
import java.util.Map;

public interface NewsPageMapper {

    /**
     * 获取日报文章 及 具体文本内容
     * @param id : 文章的id
     * @return
     */
    NewsPage selectByPrimaryKey(Long id);

    List<NewsPage> selectAll();

    int updateByPrimaryKey(NewsPage record);

    /**
     * 分页及高查
     * @param qo
     * @return
     */
    List<NewsPage> selectForList(QueryObject qo);



    /**
     * 保存日报
     * @param newsPage
     */
    void insert(NewsPage newsPage);

    /**
     * app端的推荐展示
     * @param qo
     * @return
     */
    List<NewsPage> selectForAppList(QueryObject qo);

    /**
     * 根据浏览量查询头条日报
     * @return
     */
    NewsPage selectBiggerNews();
    /**
     * 搜索日报
     * @param qo
     * @return
     */
    List<NewsPage> selectList(QueryObject qo);
}